<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //匿名函数

        // 函数表达式
        // let fn = function(num1,num2){
        //     return num1+num2
        // }
        // console.log(fn(3,5));

        //立即执行函数
        //结尾要加分号
        // (function (num1,num2) {
        //     console.log(num1+num2)
        // })(3,7);
        //两种写法
        //1
        (function (){})()
        //2
        (function(){}())
    </script>
</body>
</html>